All files / vidly/middleware error.js

50% Statements 2/4
100% Branches 0/0
0% Functions 0/1
50% Lines 2/4
1 2 3 4 5 6 7 8 9 10 11 12 13 142x   2x                      
const winston = require('winston');
 
module.exports = function(err, req, res, next){
  winston.error(err.message, err);
 
  // error
  // warn
  // info
  // verbose
  // debug 
  // silly
 
  res.status(500).send('Something failed.');
}